# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AuthorizedBuyersMarketplace.V1.Model.CreativeRequirements do
  @moduledoc """
  Message captures data about the creatives in the deal.

  ## Attributes

  *   `creativeFormat` (*type:* `String.t`, *default:* `nil`) - Output only. The format of the creative, only applicable for programmatic guaranteed and preferred deals.
  *   `creativePreApprovalPolicy` (*type:* `String.t`, *default:* `nil`) - Output only. Specifies the creative pre-approval policy.
  *   `creativeSafeFrameCompatibility` (*type:* `String.t`, *default:* `nil`) - Output only. Specifies whether the creative is safeFrame compatible.
  *   `maxAdDurationMs` (*type:* `String.t`, *default:* `nil`) - Output only. The max duration of the video creative in milliseconds. only applicable for deals with video creatives.
  *   `programmaticCreativeSource` (*type:* `String.t`, *default:* `nil`) - Output only. Specifies the creative source for programmatic deals. PUBLISHER means creative is provided by seller and ADVERTISER means creative is provided by the buyer.
  *   `skippableAdType` (*type:* `String.t`, *default:* `nil`) - Output only. Skippable video ads allow viewers to skip ads after 5 seconds. Only applicable for deals with video creatives.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :creativeFormat => String.t() | nil,
          :creativePreApprovalPolicy => String.t() | nil,
          :creativeSafeFrameCompatibility => String.t() | nil,
          :maxAdDurationMs => String.t() | nil,
          :programmaticCreativeSource => String.t() | nil,
          :skippableAdType => String.t() | nil
        }

  field(:creativeFormat)
  field(:creativePreApprovalPolicy)
  field(:creativeSafeFrameCompatibility)
  field(:maxAdDurationMs)
  field(:programmaticCreativeSource)
  field(:skippableAdType)
end

defimpl Poison.Decoder, for: GoogleApi.AuthorizedBuyersMarketplace.V1.Model.CreativeRequirements do
  def decode(value, options) do
    GoogleApi.AuthorizedBuyersMarketplace.V1.Model.CreativeRequirements.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AuthorizedBuyersMarketplace.V1.Model.CreativeRequirements do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
